package cn.fl.ref.fncprjeaplysettle.service;

import java.util.ArrayList;
import java.util.List;

import cmm.mid.core.framework.dto.DataResultDTO;
import cmm.mid.core.framework.page.Pager;
import cn.cmm.base.framework.exception.BaseException;
import cn.fl.ref.fncprjeaplysettle.vo.FncPrjEaplySettleVO;
import cn.fl.ref.fncprjeaplysettle.vo.FncPrjPayTbInfoVO;
import cn.fl.ref.fncprjeaplysettle.vo.SettlePrjDetailVO;
import fl.flow.facade.flow.dto.FlowStartParamsDTO;
import fl.ref.fncprjeaplysettle.condition.FncPrjEaplySettleQueryCondition;

/**
 * @Description: 融资项目首付款信息
 */
public interface IFncPrjEaplySettleService {

	/**
	 * 获取唯一对象
	 * 
	 * @param id
	 *            主键
	 * @return 对象DTO
	 */
	public FncPrjEaplySettleVO selectById(Long id) throws BaseException;

	/**
	 * 新增
	 * 
	 * @param entity
	 * @return
	 */
	public Long add(FncPrjEaplySettleVO entity) throws BaseException;

	/**
	 * 删除
	 * 
	 * @param id
	 * @return
	 */
	public boolean removeById(Long id) throws BaseException;

	/**
	 * 修改
	 * 
	 * @param entity
	 * @return
	 */
	public boolean modify(FncPrjEaplySettleVO entity) throws BaseException;
	
	/**
	 * 分页查询所有
	 * 
	 * @param page
	 * @return
	 */
	public Pager searchListPage(Pager page) throws BaseException;
	
	/**
	 * 条件查询所有
	 * 
	 * @param condition
	 * @return 集合
	 */
	public List<FncPrjEaplySettleVO> searchList(FncPrjEaplySettleQueryCondition condition);

	/**
	 * 修改 项目详细信息
	 * 
	 * @param entity
	 * @return
	 */
	public boolean modifySettlePrjDetail(SettlePrjDetailVO entity) throws BaseException;
	
	/**
	 * 根据项目编号查询详细信息
	 * @param fncPrjId
	 * @return
	 * @throws BaseException
	 */
	public SettlePrjDetailVO selectByFncPrjId(Long fncPrjId) throws BaseException;
	
	/**
	 * 项目信息查询列表
	 * @param page
	 * @return
	 * @throws BaseException
	 */
	public Pager selectSettlePrjDetailListPage(Pager page) throws BaseException;
	
	/**
	 * 项目提前结清信息查询列表
	 * @param page
	 * @return
	 * @throws BaseException
	 */
	public Pager selectEaplySettlePrjListPage(Pager page) throws BaseException;
	
	/**
	 * 根据用户ID和业务主键等参数启动流程
	 * @param flowStartParamsDTO 启动参数
	 */
	public DataResultDTO addNormalSettleFlowStart(FlowStartParamsDTO flowStartParamsDTO)throws BaseException;
	
	/**
	 * 根据项目编号查询还款表列表
	 * @param prjId
	 * @return
	 * @throws BaseException
	 */
	public List<FncPrjPayTbInfoVO> selectPrjPayTbInfoList(Long prjId) throws BaseException;

	/**
	 * 提前结清页面项目信息查询
	 * 根据项目编号查询项目信息
	 * @param prjId
	 * @return
	 * @throws BaseException
	 */
	public SettlePrjDetailVO selectPrjInfoByPrjId(Long prjId) throws BaseException;

	/**
	 * 根据提前结清表的逻辑编号-查看提前结清信息
	 * @param id
	 * @return
	 * @throws BaseException
	 */
	public SettlePrjDetailVO selectEaplyInfoById(Long id) throws BaseException;
	
	/**
	 * 根据项目编号-查看提前结清信息
	 * @param id
	 * @return
	 * @throws BaseException
	 */
	public SettlePrjDetailVO selectEaplyInfoByPrjId(Long id) throws BaseException;

	/**
	 * 根据提前结清表的逻辑编号-查询项目逻辑编号和机构逻辑编号
	 * @param id
	 * @return
	 * @throws BaseException
	 */
	public SettlePrjDetailVO selectOnlyPrjInfoByPrjId(Long id) throws BaseException;

	/**
	 * 根据用户ID和业务主键等参数启动流程
	 * @param flowStartParamsDTO 启动参数
	 */
	public DataResultDTO addPrjEaplySettleFlowStart(FlowStartParamsDTO flowStartParamsDTO)throws BaseException;

	/**
	 * 根据项目编号查询还款期次
	 * @param prjId
	 * @return
	 * @throws BaseException
	 */
	public ArrayList selectPrjEsPdByPrjId(Long prjId) throws BaseException;
}
